package cn.anosi.entity.test2;

import cn.anosi.entity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Created by admin on 2017/7/10.
 */
@Entity
@Table(name="orders_product")
public class OrdersProduct extends BaseEntity{
    private Orders orders;
    private Product product;

    @JoinColumn(name="o_id")
    @ManyToOne
    public Orders getOrders() {
        return orders;
    }

    public void setOrders(Orders orders) {
        this.orders = orders;
    }

    @JoinColumn(name = "p_id")
    @ManyToOne
    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }
}
